<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
        img{
            margin: 50px;
            display: none;
        }
        .time{
            margin: 50px;
            font-size: 200px;
            color: orange;

        }


    </style>
</head>
<body>
    <img name="icon" src="img/img_03.jpg">
    <div  class="time">3</div>
    <script type="text/javascript">
        //拿到对应的标签
        var img = document.getElementsByName('icon')[0]
        var div = document.getElementsByClassName('time')[0]

        //计时器
       var timer = setInterval(function(){
            div.innerHTML = div.innerHTML - 1

           if(div.innerHTML == '0'){
               //清除计时器
               clearInterval(timer)
               //隐藏div
               div.style.display = 'none'
               img.style.display = 'inline-block'
           }
        },1000)//毫秒




    </script>
</body>
</html>